<?php

//var_export函数导出对象时,__set_state()方法被调用
$obj=new class{
    public $name="nn";
    public $age=25;
    public $lengh=10;
    public $height=10;

function __set_state($properties)
{
   // var_dump($properties);
}
};
$p=var_export($obj);
//var_dump($p);